package com.leadingsoft.pwxk.converter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.leadingsoft.common.converter.AbstractConverter;
import com.leadingsoft.pwxk.dto.AirNoOrgLicenseDto;
import com.leadingsoft.pwxk.model.AirNoOrgLicense;

/**
 * @author: lipan 2018年5月15日
 * @description: ()
 * 
 */

@Component
public class AirNoOrgLicenseConverter extends AbstractConverter<AirNoOrgLicense, AirNoOrgLicenseDto> {

	@Autowired
	private AirNoOrgInfoConverter airNoOrgInfoConverter;
	@Autowired
	private AirDrainPermitConverter airDrainPermitConverter;

	@Override
	protected AirNoOrgLicenseDto toDtoActual(AirNoOrgLicense model) {
		// TODO Auto-generated method stub

		AirNoOrgLicenseDto dto = new AirNoOrgLicenseDto();
		dto.setId(model.getId());
		dto.setDataid(model.getDataid());
		dto.setGasnogrouplist(airNoOrgInfoConverter.toDto(model.getGasnogrouplist()));
		dto.setGasnogroupcountlist(airDrainPermitConverter.toDto(model.getGasnogroupcountlist()));
		// dto.setPwxkitemgasenterpriselist(airDrainPermitConverter.toDto(model.getPwxkitemgasenterpriselist()));

		return dto;
	}

	public void copyProperties(AirNoOrgLicense model, AirNoOrgLicenseDto dto) {
		// model.setId(dto.getId());
		// model.setDataid(dto.getDataid());
	}

}
